function getCookie(key){
    let coo = document.cookie;
    let arr = coo.split('; ');
    let obj = {};
    arr.forEach((item)=>{
        let arr2 = item.split('=');
        obj[arr2[0]] = arr2[1];
    })
    return obj[key];
}